$.fn.verticalTabModernSetIdx = function(a) {
    var c, d, e, f, g, b = $(this);
    if (1 == b.attr("iframeMode") || "true" == b.attr("iframeMode")) {
        if (d = b.find("a").eq(a), e = b.data("data"), !e) return;
        f = "list", b.attr("dataRoot") && (f = b.attr("dataRoot")), c = e[f].length, g = b.find(".verticalTabModern_con").eq(0).find("iframe").eq(0), 
        g.attr("src", e[f][a].url), d.prevAll("a").find("li").removeClass("verticalTabModern_current_center"), 
        d.nextAll("a").find("li").removeClass("verticalTabModern_current_center"), d.find("li").addClass("verticalTabModern_current_center");
    } else d = b.find(".verticalTabModern_normal_center").eq(a), c = b.find(".verticalTabModern_con").length, 
    b.find(".verticalTabModern_con").hide(), b.find(".verticalTabModern_con").eq(a).fadeIn(), 
    d.prevAll("li").removeClass("verticalTabModern_current_center"), d.nextAll("li").removeClass("verticalTabModern_current_center"), 
    d.addClass("verticalTabModern_current_center");
    d.prevAll("li").removeClass("verticalTabModern_current_left"), d.prevAll("li").removeClass("verticalTabModern_current_middle"), 
    d.prevAll("li").removeClass("verticalTabModern_current_middle2"), d.prevAll("li").removeClass("verticalTabModern_current_right"), 
    d.nextAll("li").removeClass("verticalTabModern_current_left"), d.nextAll("li").removeClass("verticalTabModern_current_middle"), 
    d.nextAll("li").removeClass("verticalTabModern_current_middle2"), d.nextAll("li").removeClass("verticalTabModern_current_right"), 
    0 == a ? (d.prev().addClass("verticalTabModern_current_left"), d.next().addClass("verticalTabModern_current_middle")) : a == c - 1 ? (d.prev().addClass("verticalTabModern_current_middle2"), 
    d.next().addClass("verticalTabModern_current_right")) : (d.prev().addClass("verticalTabModern_current_middle2"), 
    d.next().addClass("verticalTabModern_current_middle")), b.trigger("actived", a), 
    b.attr("selectedIdx", a);
}, $.fn.verticalTabModernSetEnable = function(a, b) {
    var d, e, f, g, c = $(this);
    if (1 == c.attr("iframeMode") || "true" == c.attr("iframeMode")) {
        if (f = c.data("data"), !f) return;
        g = "list", c.attr("dataRoot") && (g = c.attr("dataRoot")), d = f[g].length, e = c.find("a").eq(a), 
        1 == b ? (e.find("li").removeClass("disabled"), e.bideClickIframe(!0, c, a, d)) : (e.find("li").addClass("disabled"), 
        e.bideClickIframe(!1, c, a, d));
    } else d = c.find(".verticalTabModern_con").length, e = c.find(".verticalTabModern_normal_center").eq(a), 
    1 == b ? (e.removeClass("disabled"), e.bideClick(!0, c, a, d)) : (e.addClass("disabled"), 
    e.bideClick(!1, c, a, d));
}, $.fn.verticalTabModernRender = function() {
    function q(h) {
        h && (b = h[i].length, $.each(h[i], function(h, i) {
            var k, l, m, n, o, p, q, j = uncompile(quiLanguage.basicTab.tabName);
            i.name && (j = i.name), d == h && g.attr("src", i.url), 0 == h && (k = $('<li class="verticalTabModern_normal_left"></li>'), 
            c.append(k), d == h && k.addClass("verticalTabModern_current_left")), l = $('<li class="verticalTabModern_normal_center"></li>'), 
            m = $("<a></a>"), null != i.url && m.attr("href", i.url), null != f && m.attr("target", f), 
            n = $('<div class="tab_title_content"></div>'), n.text(j), l.append(n), m.append(l), 
            c.append(m), e || l.addClass("disabled"), o = !0, i.itemDisabled && ("true" == i.itemDisabled || 1 == i.itemDisabled) && (l.addClass("disabled"), 
            o = !1), l.data("idx", h), d == h && l.addClass("verticalTabModern_current_center"), 
            h == b - 1 ? (p = $('<li class="verticalTabModern_normal_right"></li>'), c.append(p), 
            d == h && p.addClass("verticalTabModern_current_right")) : (q = $('<li class="verticalTabModern_normal_middle"></li>'), 
            c.append(q), d == h ? q.addClass("verticalTabModern_current_middle") : d == h + 1 && q.addClass("verticalTabModern_current_middle2")), 
            e && o ? m.bideClickIframe(!0, a, h, b) : m.bideClickIframe(!1, a, h, b);
        }));
    }
    var b, e, f, g, h, i, j, k, m, n, o, p, a = $(this), c = $('<div class="verticalTabModern_top"></div>'), d = 0;
    if (a.attr("selectedIdx") ? d = Number(a.attr("selectedIdx")) : a.attr("selectedIdx", 0), 
    e = !0, (1 == a.attr("allItemDisabled") || "true" == a.attr("allItemDisabled")) && (e = !1), 
    f = null, h = !1, (1 == a.attr("showProgress") || "true" == a.attr("showProgress")) && (h = !0), 
    1 == a.attr("iframeMode") || "true" == a.attr("iframeMode") || 1 == a.attr("singleContentMode") || "true" == a.attr("singleContentMode")) {
        if (a.find(">div").length > 1 && alert(uncompile(quiLanguage.basicTab.errorMessage)), 
        a.find(">div").addClass("verticalTabModern_con"), a.find(">div").css({
            overflowX: "hidden",
            overflowY: "auto"
        }), g = a.find(">div").eq(0).find("iframe").eq(0), g.attr("name") && (f = g.attr("name")), 
        i = "list", a.attr("dataRoot") && (i = a.attr("dataRoot")), j = a.attr("params")) try {
            k = JSON.parse(j);
        } catch (l) {
            k = [], alert(uncompile(quiLanguage.basicTab.paramErrorMessage));
        } else k = [];
        if (m = [], n = a.attr("url"), o = a.attr("data"), p = a.data("data")) q(p); else if (o) {
            try {
                m = JSON.parse(o);
            } catch (l) {
                m = [], alert(uncompile(quiLanguage.basicTab.dataErrorMessage));
            }
            a.data("data", m), q(m);
        } else n && $.ajax({
            url: a.attr("url"),
            dataType: "json",
            data: k,
            error: function() {
                alert(uncompile(quiLanguage.basicTab.urlErrorMessage));
            },
            success: function(b) {
                a.data("data", b), m = b, q(b);
            }
        });
    } else b = a.find(">div").length, a.find(">div").each(function(f) {
        var h, i, j, k, l, m, g = uncompile(quiLanguage.basicTab.tabName);
        $(this).attr("name") && (g = $(this).attr("name")), $(this).addClass("verticalTabModern_con"), 
        d != f && $(this).hide(), 0 == f && (h = $('<li class="verticalTabModern_normal_left"></li>'), 
        c.append(h), d == f && h.addClass("verticalTabModern_current_left")), i = $('<li class="verticalTabModern_normal_center"></li>'), 
        c.append(i), j = $('<div class="tab_title_content"></div>'), j.text(g), i.append(j), 
        i.data("idx", f), e || i.addClass("disabled"), k = !0, ("true" == $(this).attr("itemDisabled") || 1 == $(this).attr("itemDisabled")) && (i.addClass("disabled"), 
        k = !1), d == f && i.addClass("verticalTabModern_current_center"), f == b - 1 ? (l = $('<li class="verticalTabModern_normal_right"></li>'), 
        c.append(l), d == f && l.addClass("verticalTabModern_current_right")) : (m = $('<li class="verticalTabModern_normal_middle"></li>'), 
        c.append(m), d == f ? m.addClass("verticalTabModern_current_middle") : d == f + 1 && m.addClass("verticalTabModern_current_middle2")), 
        e && k && (1 == a.attr("hoverMode") || "true" == a.attr("hoverMode") ? i.bideOver(!0, a, f, b) : i.bideClick(!0, a, f, b));
    });
    a.append($('<div class="clear"></div>')), a.prepend(c);
}, $.fn.bideClick = function(a, b, c, d) {
    var e = $(this);
    e.unbind("click"), a && e.bind("click", {}, function() {
        b.find(".verticalTabModern_con").hide(), b.find(".verticalTabModern_con").eq(c).fadeIn(), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_left"), $(this).prevAll("li").removeClass("verticalTabModern_current_center"), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_middle"), $(this).prevAll("li").removeClass("verticalTabModern_current_middle2"), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_right"), $(this).nextAll("li").removeClass("verticalTabModern_current_left"), 
        $(this).nextAll("li").removeClass("verticalTabModern_current_center"), $(this).nextAll("li").removeClass("verticalTabModern_current_middle"), 
        $(this).nextAll("li").removeClass("verticalTabModern_current_middle2"), $(this).nextAll("li").removeClass("verticalTabModern_current_right"), 
        $(this).addClass("verticalTabModern_current_center"), 0 == c ? ($(this).prev().addClass("verticalTabModern_current_left"), 
        $(this).next().addClass("verticalTabModern_current_middle")) : c == d - 1 ? ($(this).prev().addClass("verticalTabModern_current_middle2"), 
        $(this).next().addClass("verticalTabModern_current_right")) : ($(this).prev().addClass("verticalTabModern_current_middle2"), 
        $(this).next().addClass("verticalTabModern_current_middle")), b.trigger("actived", c), 
        b.attr("selectedIdx", c);
    });
}, $.fn.bideOver = function(a, b, c, d) {
    var e = $(this);
    e.unbind("mouseover"), a && e.bind("mouseover", {}, function() {
        b.find(".verticalTabModern_con").hide(), b.find(".verticalTabModern_con").eq(c).fadeIn(), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_left"), $(this).prevAll("li").removeClass("verticalTabModern_current_center"), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_middle"), $(this).prevAll("li").removeClass("verticalTabModern_current_middle2"), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_right"), $(this).nextAll("li").removeClass("verticalTabModern_current_left"), 
        $(this).nextAll("li").removeClass("verticalTabModern_current_center"), $(this).nextAll("li").removeClass("verticalTabModern_current_middle"), 
        $(this).nextAll("li").removeClass("verticalTabModern_current_middle2"), $(this).nextAll("li").removeClass("verticalTabModern_current_right"), 
        $(this).addClass("verticalTabModern_current_center"), 0 == c ? ($(this).prev().addClass("verticalTabModern_current_left"), 
        $(this).next().addClass("verticalTabModern_current_middle")) : c == d - 1 ? ($(this).prev().addClass("verticalTabModern_current_middle2"), 
        $(this).next().addClass("verticalTabModern_current_right")) : ($(this).prev().addClass("verticalTabModern_current_middle2"), 
        $(this).next().addClass("verticalTabModern_current_middle")), b.trigger("actived", c), 
        b.attr("selectedIdx", c);
    });
}, $.fn.bideClickIframe = function(a, b, c, d) {
    var e = $(this);
    e.unbind("click"), a ? e.bind("click", {}, function() {
        if ($(this).prevAll("li").removeClass("verticalTabModern_current_left"), $(this).prevAll("li").removeClass("verticalTabModern_current_middle"), 
        $(this).prevAll("li").removeClass("verticalTabModern_current_middle2"), $(this).prevAll("li").removeClass("verticalTabModern_current_right"), 
        $(this).prevAll("a").find("li").removeClass("verticalTabModern_current_center"), 
        $(this).nextAll("li").removeClass("verticalTabModern_current_left"), $(this).nextAll("li").removeClass("verticalTabModern_current_middle"), 
        $(this).nextAll("li").removeClass("verticalTabModern_current_middle2"), $(this).nextAll("li").removeClass("verticalTabModern_current_right"), 
        $(this).nextAll("a").find("li").removeClass("verticalTabModern_current_center"), 
        $(this).find("li").addClass("verticalTabModern_current_center"), 0 == c ? ($(this).prev().addClass("verticalTabModern_current_left"), 
        $(this).next().addClass("verticalTabModern_current_middle")) : c == d - 1 ? ($(this).prev().addClass("verticalTabModern_current_middle2"), 
        $(this).next().addClass("verticalTabModern_current_right")) : ($(this).prev().addClass("verticalTabModern_current_middle2"), 
        $(this).next().addClass("verticalTabModern_current_middle")), "true" == b.attr("showProgress") || 1 == b.attr("showProgress")) try {
            showProgressBar();
        } catch (a) {}
        b.trigger("actived", c), b.attr("selectedIdx", c);
    }) : e.bind("click", {}, function() {
        return !1;
    });
};